%%% -------------------------------------------------------------------
%%% Author  : 77
%%% Description :
%%%
%%% Created : 2011-7-2
%%% -------------------------------------------------------------------
-module(cloud_master_sup).
-author(kanghua ).  
-email(kanghua151@msn.com).  
-date("2011.07.06").  
-behaviour(supervisor).
%% --------------------------------------------------------------------
%% Include files
%% --------------------------------------------------------------------

%% --------------------------------------------------------------------
%% External exports
%% --------------------------------------------------------------------
-export([start_link/0]).

%% --------------------------------------------------------------------
%% Internal exports
%% --------------------------------------------------------------------
-export([init/1]).

%% --------------------------------------------------------------------
%% Macros
%% --------------------------------------------------------------------
-define(SERVER, ?MODULE).

%% --------------------------------------------------------------------
%% Records
%% --------------------------------------------------------------------

%% ====================================================================
%% External functions
%% ====================================================================
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).


%% ====================================================================
%% Server functions
%% ====================================================================
%% --------------------------------------------------------------------
%% Func: init/1
%% Returns: {ok,  {SupFlags,  [ChildSpec]}} |
%%          ignore                          |
%%          {error, Reason}
%% --------------------------------------------------------------------
init([]) -> 
    AChild = {meta_server,{meta_server,start_link,[]},
	      permanent,2000,worker,[meta_server]},
    BChild = {status_monitor,{status_monitor,start_link,[]},
	      permanent,2000,worker,[status_monitor]},
%%    {ok,{{one_for_all,0,1}, [AChild,BChild]}}.
	  Children = [AChild,BChild],
      RestartStrategy = {one_for_one,0,1},
	  {ok,{RestartStrategy, Children}}.

%% ====================================================================
%% Internal functions
%% ====================================================================

